#ifndef CLIENT_VISTA_EXITCLIENT_H_
#define CLIENT_VISTA_EXITCLIENT_H_
#include <iostream>
#include <gtkmm.h>

class ExitClient : public Gtk::Window{
public:
	ExitClient(std::string query_exit): query(query_exit),yes_button("Si"),no_button("No"){
		set_size_request(100, 100);
		set_title("Salir");
		set_border_width(10);
		yes_exit=false;
		yes_button.signal_clicked().connect(
						sigc::mem_fun(*this, &ExitClient::yes_clicked));
		no_button.signal_clicked().connect(
						sigc::mem_fun(*this, &ExitClient::no_clicked));

		add(exit_box);
		opcion.pack_start(yes_button);
		opcion.pack_start(no_button);

		exit_box.pack_start(query);
		exit_box.pack_start(opcion);
		show_all_children();

	}
	bool is_exit(){
			return yes_exit;
		}
protected:
	void yes_clicked(){
		yes_exit=true;
		hide();
    }

	void no_clicked(){
		hide();
	}
private:
	bool yes_exit;
	Gtk::HBox opcion;
	Gtk::VBox exit_box;
	Gtk::Button yes_button;
	Gtk::Button no_button;
	Gtk::Label query;
};
#endif /* CLIENT_VISTA_EXITCLIENT_H_ */
